<?php

namespace App\Containers\AppSection\File\Actions;

use App\Containers\AppSection\File\Tasks\GetAllFilesTask;
use App\Ship\Parents\Actions\Action;
use App\Ship\Parents\Requests\Request;

class GetFilesAction extends Action
{
    public function run(Request $request)
    {
        return app(GetAllFilesTask::class)
            ->thisProfile($request->profile()->id)
            ->fromType($request->getInputByKey('type'))
            ->run();
    }
}
